#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    vector<string> res;
    int l;
    void MakeStr(int cur, bool ok, string str)
    {
        if (cur == l)
        {
            res.push_back(str);
            //return;
        }
        else if (ok)
        {
            MakeStr(cur + 1, false, str + '0');
            MakeStr(cur + 1, true, str + '1');
        }
        else
        {
            MakeStr(cur + 1, true, str + '1');
        }
    }
    vector<string> validStrings(int n) {
        l = n;
        MakeStr(0, true, string());
        return res;
    }
};